<%@include file="../base/include.jsp"%>

<c:if test="${newsListCommand.prevPage || newsListCommand.nextPage}">
	<div class="pagination pagination-centered">
		<ul>
			<c:if test='${!newsListCommand.prevPage}'>
				<li class="disabled"><a>FIRST</a></li>
				<li class="prev disabled"><a>&larr;</a></li>
			</c:if>
			<c:if test='${newsListCommand.prevPage}'>
				<li><a href="<c:url value='/home/0'/>">FIRST</a></li>
				<li class="prev"><a href="<c:url value='/home/${newsListCommand.page - 1}'/>">&larr;</a></li>
			</c:if>
			
			<c:if test="${newsListCommand.page - 2 >= 0}">
				<li><a href="<c:url value='/home/${newsListCommand.page - 2}'/>">${newsListCommand.page - 1}</a></li>
			</c:if>
			<c:if test="${newsListCommand.page - 1 >= 0}">
				<li><a href="<c:url value='/home/${newsListCommand.page - 1}'/>">${newsListCommand.page}</a></li>
			</c:if>
			<li class="active"><a href="<c:url value='/tote/list/${newsListCommand.page}'/>">${newsListCommand.page + 1}</a></li>
			<c:if test="${newsListCommand.page + 1 <= newsMaxPage}">
				<li><a href="<c:url value='/home/${newsListCommand.page + 1}'/>">${newsListCommand.page + 2}</a></li>
			</c:if>
			<c:if test="${newsListCommand.page + 2 <= newsMaxPage}">
				<li><a href="<c:url value='/home/${newsListCommand.page + 2}'/>">${exmas.page + 3}</a></li>
			</c:if>
			
			<c:if test='${!newsListCommand.nextPage}'>
				<li class="next disabled"><a>&rarr;</a></li>
				<li class="disabled"><a>LAST</a></li>
			</c:if>
			<c:if test='${newsListCommand.nextPage}'>
				<li class="next"><a href="<c:url value='/home/${newsListCommand.page + 1}'/>">&rarr;</a></li>
				<li><a href="<c:url value='/home/${newsMaxPage}'/>">LAST(${newsMaxPage + 1})</a></li>
			</c:if>
		</ul>
	</div>
</c:if>
